package model

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ AwRolesModel = (*customAwRolesModel)(nil)

type (
	// AwRolesModel is an interface to be customized, add more methods here,
	// and implement the added methods in customAwRolesModel.
	AwRolesModel interface {
		awRolesModel
		withSession(session sqlx.Session) AwRolesModel
	}

	customAwRolesModel struct {
		*defaultAwRolesModel
	}
)

// NewAwRolesModel returns a model for the database table.
func NewAwRolesModel(conn sqlx.SqlConn) AwRolesModel {
	return &customAwRolesModel{
		defaultAwRolesModel: newAwRolesModel(conn),
	}
}

func (m *customAwRolesModel) withSession(session sqlx.Session) AwRolesModel {
	return NewAwRolesModel(sqlx.NewSqlConnFromSession(session))
}
